home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Apple IIGS SCSI Driver Shell / SCSI Command Table next >
Encoding:
Text File  |  1990-09-14  |  45.9 KB  |  1,394 lines  |  [TEXT/MPS ]

  1.  
  2. ;*******************************************************
  3. ;
  4. ;    SCSI Driver 'Command Table'.
  5. ;
  6. ;    Written by Matt Gulick.        Started May 20,1988
  7. ;
  8. ;    Copyright Apple Computer, Inc. 1988-90
  9. ;
  10. ;*******************************************************
  11.  
  12. ;*******************************************************
  13. ;
  14. ;    This file contains the Command Tables that actually
  15. ;    drives the SCSI Driver when talking to a target
  16. ;    device.  By changing these tables, the SCSI Driver
  17. ;    will be able to talk to almost any class of SCSI
  18. ;    Device.  There are actually two tables in this file.
  19. ;    The first table is a list of a two word group for
  20. ;    each command supported.
  21. ;
  22. ;    The first word is the actual SCSI Command Number
  23. ;    followed by the low word of that commands table
  24. ;    address.  We use the only the low word because the
  25. ;    second table is in the same bank as the indexing
  26. ;    table.
  27. ;
  28. ;    The second table is the actual command translation
  29. ;    data.  The first word is a set of flags that
  30. ;    indicate some of the translation and verification
  31. ;    that needs to take place.
  32. ;
  33. ;        Bit    15    =    Data is being sent to the device
  34. ;            14    =    Data is to be received by us
  35. ;            13    =    This is a Status Command
  36. ;            12    =    This is a Control Command
  37. ;            11    =    Data I/O Command
  38. ;            10    =    Device I/O Command
  39. ;             9    =    Command Includes Block Number
  40. ;             8    =    Must be first device if linked
  41. ;             7    =    Internal Driver Command Only
  42. ;             6    =    Must issue a DISK_SW with this call
  43. ;             5    =    Results in device offline
  44. ;             4    =    Reserved
  45. ;             3    =    Command Data needs no translation
  46. ;             2    =    Reserved
  47. ;             1    =    Block request count goes into command
  48. ;             0    =    Byte request count goes into command
  49. ;
  50. ;    The second word is a time out tick count to be used by
  51. ;    the SCSI Manager to determine when to abandone any SCSI
  52. ;    Device transaction due to lack of response by the
  53. ;    target.  Each tick = 250 ms.
  54. ;
  55. ;    Any additional words are only used if Bit 3 above is
  56. ;    zero.  The translation bytes conatin two offsets.  A
  57. ;    Source and a Destination offset.  This is used by the
  58. ;    driver to take information fron the caller's command
  59. ;    (Source) and .OR. them in to their proper location in
  60. ;    the SCSI Command Packet (Destination).
  61. ;
  62. ;        MSBit                            LSBit
  63. ;            %0000    0000    0000    0000
  64. ;            
  65. ;               R      S          R          D
  66. ;               e      o          e          e
  67. ;               s      u          s          s
  68. ;               e      r          e          t
  69. ;               r      c          r          i
  70. ;               v      e          v          t
  71. ;               e              e          i
  72. ;               d              d          n
  73. ;                                      a
  74. ;                                      t
  75. ;                                      i
  76. ;                                      o
  77. ;                                      n
  78. ;
  79. ;    A NULL Word at any location in the command entry
  80. ;    will terminate translation for that command.
  81. ;
  82. ;*******************************************************
  83.  
  84. ;*******************************************************
  85. ;
  86. ;    Revision History:
  87. ;
  88. ;*******************************************************
  89.  
  90. ;    May 20, 1988    File started.
  91. ;    Feb 28, 1989    Added Tape Drive Tables
  92.  
  93.                 STRING        PASCAL
  94.                 BLANKS        OFF
  95.                 PAGESIZE    70
  96.                 PRINT        NOGEN
  97.                 PRINT        NOMDIR
  98.                 MACHINE        M65816
  99.  
  100.                 PRINT        OFF
  101.  
  102.                 INCLUDE        'scsihd.equates'
  103.                 INCLUDE        'M16.MEMORY'
  104.                 INCLUDE        'M16.UTIL'
  105.                 PRINT        ON
  106.  
  107.                 EJECT
  108.             
  109. ;*******************************************************
  110. ;
  111. ;    List of Commands Supported:
  112. ;
  113. ;*******************************************************
  114.  
  115.             EXPORT    cmd_t_tbl
  116. cmd_t_tbl    PROC
  117.  
  118. ;-------------------------------------------------------------------------------
  119.  
  120.             IF        scsi_dtype = direct_acc    THEN
  121.                                             ;
  122.                                             ; 
  123.                                             ;
  124.                                             ; 
  125.             dc.w    $0028                    ; Command $28 'READ (EXTENDED)'
  126.             dc.w    scsi_cmd28                ; Mandatory
  127.                                             ; 
  128.             dc.w    $002A                    ; Command $2A 'WRITE (EXTENDED)'
  129.             dc.w    scsi_cmd2A                ; Mandatory
  130.                                             ; 
  131.             dc.w    $0008                    ; Command $08 'READ'
  132.             dc.w    scsi_cmd08                ; Mandatory
  133.                                             ; 
  134.             dc.w    $000A                    ; Command $0A 'WRITE'
  135.             dc.w    scsi_cmd0A                ; Mandatory
  136.                                             ;
  137.             dc.w    $0000                    ; Command $00 'TEST UNIT READY'
  138.             dc.w    scsi_cmd00                ; Mandatory
  139.                                             ;
  140.             dc.w    $0003                    ; Command $03 'REQUEST SENSE'
  141.             dc.w    scsi_cmd03                ; Mandatory
  142.                                             ; 
  143.             dc.w    $0025                    ; Command $25 'READ CAPACITY'
  144.             dc.w    scsi_cmd25                ; Mandatory
  145.                                             ; 
  146.             dc.w    $0012                    ; Command $12 'INQUIRY'
  147.             dc.w    scsi_cmd12                ; Mandatory
  148.                                             ; 
  149.             dc.w    $001A                    ; Command $1A 'MODE SENSE'
  150.             dc.w    scsi_cmd1A                ; Optional
  151.                                             ; 
  152.             dc.w    $0015                    ; Command $15 'MODE SELECT'
  153.             dc.w    scsi_cmd15                ; Optional
  154.                                             ; 
  155.             dc.w    $0004                    ; Command $04 'FORMAT UNIT'
  156.             dc.w    scsi_cmd04                ; Mandatory
  157.                                             ; 
  158.             dc.w    $001E                    ; Command $1E 'PREVENT/ALLOW REMOVAL'
  159.             dc.w    scsi_cmd1E                ; Optional
  160.                                             ;
  161.             dc.w    $0001                    ; Command $01 'REZERO UNIT'
  162.             dc.w    scsi_cmd01                ; Optional
  163.                                             ; 
  164.             dc.w    $0007                    ; Command $07 'REASSIGN BLOCKS'
  165.             dc.w    scsi_cmd07                ; Optional
  166.                                             ; 
  167.             dc.w    $000B                    ; Command $0B 'SEEK'
  168.             dc.w    scsi_cmd0B                ; Optional
  169.                                             ; 
  170.             dc.w    $002B                    ; Command $2B 'SEEK (EXTENDED)'
  171.             dc.w    scsi_cmd2B                ; Optional
  172.                                             ; 
  173.             dc.w    $0016                    ; Command $16 'RESERVE UNIT'
  174.             dc.w    scsi_cmd16                ; Mandatory
  175.                                             ; 
  176.             dc.w    $0017                    ; Command $17 'RELEASE UNIT'
  177.             dc.w    scsi_cmd17                ; Mandatory
  178.                                             ; 
  179.             dc.w    $001B                    ; Command $1B 'START/STOP UNIT'
  180.             dc.w    scsi_cmd1B                ; Optional
  181.                                             ; 
  182.             dc.w    $001C                    ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
  183.             dc.w    scsi_cmd1C                ; Optional
  184.                                             ; 
  185.             dc.w    $001D                    ; Command $1D 'SEND DIAGNOSTICS'
  186.             dc.w    scsi_cmd1D                ; Mandatory
  187.                                             ; 
  188.             dc.w    $002E                    ; Command $2E 'WRITE AND VERIFY'
  189.             dc.w    scsi_cmd2E                ; Optional
  190.                                             ; 
  191.             dc.w    $002F                    ; Command $2F 'VERIFY'
  192.             dc.w    scsi_cmd2F                ; Optional
  193.                                             ; 
  194.             dc.w    $0033                    ; Command $33 'SET LIMITS'
  195.             dc.w    scsi_cmd33                ; Optional
  196.                                             ; 
  197.             dc.w    $0034                    ; Command $34 'PRE-FETCH'
  198.             dc.w    scsi_cmd34                ; Optional
  199.                                             ; 
  200.             dc.w    $0035                    ; Command $35 'SYNCHRONIZE CACHE'
  201.             dc.w    scsi_cmd35                ; Optional
  202.                                             ;
  203.             dc.w    $0036                    ; Command $36 'LOCK/UNLOCK CACHE'
  204.             dc.w    scsi_cmd36                ; Optional
  205.                                             ; 
  206.             dc.w    $0037                    ; Command $37 'READ DEFECT DATA'
  207.             dc.w    scsi_cmd37                ; Optional
  208.                                             ; 
  209.             dc.w    $003B                    ; Command $3B 'WRITE BUFFER'
  210.             dc.w    scsi_cmd3B                ; Optional
  211.                                             ; 
  212.             dc.w    $003C                    ; Command $3C 'READ BUFFER'
  213.             dc.w    scsi_cmd3C                ; Optional
  214.                                             ; 
  215.             dc.w    $003E                    ; Command $3E 'READ LONG'
  216.             dc.w    scsi_cmd3E                ; Optional
  217.                                             ; 
  218.             dc.w    $003F                    ; Command $3F 'WRITE LONG'
  219.             dc.w    scsi_cmd3F                ; Optional
  220.                                             ; 
  221.             dc.w    $004C                    ; Command $4C 'LOG SELECT'
  222.             dc.w    scsi_cmd4C                ; Optional
  223.                                             ; 
  224.             dc.w    $004D                    ; Command $4D 'LOG SENSE'
  225.             dc.w    scsi_cmd4D                ; Optional
  226.                                             ; 
  227.             dc.w    $0055                    ; Command $55 'MODE SELECT'
  228.             dc.w    scsi_cmd55                ; Optional
  229.                                             ; 
  230.             dc.w    $005A                    ; Command $5A 'MODE SENSE'
  231.             dc.w    scsi_cmd5A                ; Mandatory
  232.                                             ; 
  233.             dc.w    $00B3                    ; Command $B3 'SET LIMITS'
  234.             dc.w    scsi_cmdB3                ; Optional
  235.  
  236.             ENDIF
  237.  
  238. ;-------------------------------------------------------------------------------
  239.  
  240.             IF        scsi_dtype = apple_cd    THEN
  241.                                             ;
  242.                                             ;
  243.             dc.w    $00CC                    ; Command $CC 'AUDIO STATUS'
  244.             dc.w    scsi_cmdCC                ; Mandatory
  245.                                             ; 
  246.             dc.w    $0003                    ; Command $03 'REQUEST SENSE'
  247.             dc.w    scsi_cmd03                ; Mandatory
  248.                                             ; 
  249.             dc.w    $0028                    ; Command $28 'READ (EXTENDED)'
  250.             dc.w    scsi_cmd28                ; Mandatory
  251.                                             ; 
  252.             dc.w    $0008                    ; Command $08 'READ'
  253.             dc.w    scsi_cmd08                ; Mandatory
  254.                                             ; 
  255.             dc.w    $0000                    ; Command $00 'TEST UNIT READY'
  256.             dc.w    scsi_cmd00                ; Mandatory
  257.                                             ;
  258.             dc.w    $0012                    ; Command $12 'INQUIRY'
  259.             dc.w    scsi_cmd12                ; Mandatory
  260.                                             ; 
  261.             dc.w    $001A                    ; Command $1A 'MODE SENSE'
  262.             dc.w    scsi_cmd1A                ; Optional
  263.                                             ; 
  264.             dc.w    $0025                    ; Command $25 'READ CAPACITY'
  265.             dc.w    scsi_cmd25                ; Mandatory
  266.                                             ; 
  267.             dc.w    $0015                    ; Command $15 'MODE SELECT'
  268.             dc.w    scsi_cmd15                ; Optional
  269.                                             ; 
  270.             dc.w    $00C0                    ; Command $C0 'EJECT DISK'
  271.             dc.w    scsi_cmdC0                ; Mandatory
  272.                                             ; 
  273.             dc.w    $001E                    ; Command $1E 'PREVENT/ALLOW REMOVAL'
  274.             dc.w    scsi_cmd1E                ; Optional
  275.                                             ; 
  276.             dc.w    $00C9                    ; Command $C9 'AUDIO PLAY'
  277.             dc.w    scsi_cmdC9                ; Mandatory
  278.                                             ; 
  279.             dc.w    $00CA                    ; Command $CA 'AUDIO PAUSE'
  280.             dc.w    scsi_cmdCA                ; Mandatory
  281.                                             ; 
  282.             dc.w    $00CB                    ; Command $CB 'AUDIO STOP'
  283.             dc.w    scsi_cmdCB                ; Mandatory
  284.                                             ; 
  285.             dc.w    $00CD                    ; Command $CD 'AUDIO SCAN'
  286.             dc.w    scsi_cmdCD                ; Mandatory
  287.                                             ;
  288.             dc.w    $0001                    ; Command $01 'REZERO UNIT'
  289.             dc.w    scsi_cmd01                ; Optional
  290.                                             ;
  291.             dc.w    $000B                    ; Command $0B 'SEEK'
  292.             dc.w    scsi_cmd0B                ; Optional
  293.                                             ; 
  294.             dc.w    $0016                    ; Command $16 'RESERVE UNIT'
  295.             dc.w    scsi_cmd16                ; Mandatory
  296.                                             ; 
  297.             dc.w    $0017                    ; Command $17 'RELEASE UNIT'
  298.             dc.w    scsi_cmd17                ; Mandatory
  299.                                             ; 
  300.             dc.w    $001B                    ; Command $1B 'START/STOP UNIT'
  301.             dc.w    scsi_cmd1B                ; Optional
  302.                                             ; 
  303.             dc.w    $001C                    ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
  304.             dc.w    scsi_cmd1C                ; Optional
  305.                                             ; 
  306.             dc.w    $001D                    ; Command $1D 'SEND DIAGNOSTICS'
  307.             dc.w    scsi_cmd1D                ; Mandatory
  308.                                             ; 
  309.             dc.w    $002B                    ; Command $2B 'SEEK (EXTENDED)'
  310.             dc.w    scsi_cmd2B                ; Optional
  311.                                             ; 
  312.             dc.w    $002F                    ; Command $2F 'VERIFY'
  313.             dc.w    scsi_cmd2F                ; Optional
  314.                                             ; 
  315.             dc.w    $003B                    ; Command $3B 'WRITE BUFFER'
  316.             dc.w    scsi_cmd3B                ; Optional
  317.                                             ; 
  318.             dc.w    $003C                    ; Command $3C 'READ BUFFER'
  319.             dc.w    scsi_cmd3C                ; Optional
  320.                                             ; 
  321.             dc.w    $004C                    ; Command $4C 'LOG SELECT'
  322.             dc.w    scsi_cmd4C                ; Optional
  323.                                             ; 
  324.             dc.w    $004D                    ; Command $4D 'LOG SENSE'
  325.             dc.w    scsi_cmd4D                ; Optional
  326.                                             ; 
  327.             dc.w    $0055                    ; Command $55 'MODE SELECT (EXTENDED)'
  328.             dc.w    scsi_cmd55                ; Optional
  329.                                             ; 
  330.             dc.w    $005A                    ; Command $5A 'MODE SENSE (EXTENDED)'
  331.             dc.w    scsi_cmd5A                ; Optional
  332.                                             ; 
  333.             dc.w    $00C1                    ; Command $C1 'READ TOC'
  334.             dc.w    scsi_cmdC1                ; Mandatory
  335.                                             ; 
  336.             dc.w    $00C2                    ; Command $C2 'READ Q SUBCODE'
  337.             dc.w    scsi_cmdC2                ; Mandatory
  338.                                             ; 
  339.             dc.w    $00C3                    ; Command $C3 'READ HEADER'
  340.             dc.w    scsi_cmdC3                ; Mandatory
  341.                                             ; 
  342.             dc.w    $00C8                    ; Command $C8 'AUDIO TRACK SEARCH'
  343.             dc.w    scsi_cmdC8                ; Mandatory
  344.  
  345.             ENDIF
  346.  
  347. ;-------------------------------------------------------------------------------
  348.  
  349.                                             ; 
  350.             dc.w    $FFFF                    ; End of the List.
  351.             dc.w    $FFFF                    ;
  352.  
  353.             EJECT
  354.  
  355.  
  356. ;*******************************************************
  357. ;
  358. ;    Command translation Table:
  359. ;
  360. ;*******************************************************
  361.  
  362. ;*******************************************************
  363. ;
  364. ;scsi_cmdxx    dc.w    scsit_tx++\                ; SCSI Send Data Command
  365. ;                    scsit_rx++\                ; SCSI Receive Data Command
  366. ;                    scsit_stat++\            ; SCSI Status Command
  367. ;                    scsit_cont++\            ; SCSI Control Command
  368. ;                    scsit_data++\            ; SCSI Data I/O Command
  369. ;                    scsit_dvc++\            ; SCSI Device I/O Command
  370. ;                    scsit_blk++\            ; Command has a Block Number
  371. ;                    scsic_1st++\            ; Must be first device if linked
  372. ;                    scsic_int++\            ; Internal Driver Command only
  373. ;                    scsic_dsw++\            ; Issue DISK_SW with this call
  374. ;                    scsic_off++\            ; Device is going offline.
  375. ;                    scsic_tout++\            ; Adjust time out by block count
  376. ;                    scsid_asis++\            ; CMD Data is in SCSI format
  377. ;                    scsid_blk++\            ; Convert Trans Count to Blocks
  378. ;                    scsid_byte++\            ; Leave Trans Count in Bytes
  379. ;                    scsid_none                ; Transfer count does not go in CMD
  380. ;            dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  381. ;            dc.w    scsi_endcmd                ; End of SCSI Translation Table
  382. ;
  383. ;*******************************************************
  384.  
  385. ;-------------------------------------------------------------------------------
  386.  
  387.             IF        scsi_dtype = direct_acc    THEN
  388.  
  389.                                             ;
  390.                                             ; Command $00 'TEST UNIT READY'
  391.                                             ; Mandatory
  392.                                             ; 
  393. scsi_cmd00    dc.w    scsit_stat++\            ; It is a Status Command
  394.                     scsit_dvc++\            ; It is a Device I/O Command
  395.                     scsid_asis++\            ; It is an as is Packet
  396.                     scsid_none                ; Length is not in command
  397.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  398.             dc.w    scsi_endcmd
  399.                                             ;
  400.                                             ; Command $01 'REZERO UNIT'
  401.                                             ; Optional
  402.                                             ; 
  403. scsi_cmd01    dc.w    scsit_cont++\            ; It is a Control Command
  404.                     scsit_dvc++\            ; It is a Device I/O Command
  405.                     scsid_asis++\            ; It is an as is Packet
  406.                     scsid_none                ; Length is not in command
  407.             dc.w    2*one_min                ; Time out = 2 minutes.
  408.             dc.w    scsi_endcmd
  409.                                             ;
  410.                                             ; Command $03 'REQUEST SENSE'
  411.                                             ; Mandatory
  412.                                             ; 
  413. scsi_cmd03    dc.w    scsit_rx++\                ; It requests data from target
  414.                     scsit_stat++\            ; It is a Status Command
  415.                     scsit_dvc++\            ; It is a Device I/O Command
  416.                     scsid_asis++\            ; It is an as is Packet
  417.                     scsid_byte                ; Length is in Bytes
  418.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  419.             dc.w    scsi_endcmd
  420.                                             ;
  421.                                             ; Command $04 'FORMAT UNIT'
  422.                                             ; Mandatory
  423.                                             ; 
  424. scsi_cmd04    dc.w    scsit_tx++\                ; It sends data to the target
  425.                     scsit_cont++\            ; It is a Control Command
  426.                     scsit_dvc++\            ; It is a Device I/O Command
  427.                     scsic_1st++\            ; Must be first device if linked
  428.                     scsic_dsw++\            ; Issue DISK_SW with this call
  429.                     scsic_off++\            ; Device is going offline.
  430.                     scsid_asis++\            ; It is an as is Packet
  431.                     scsid_none                ; Length is not in command
  432.             dc.w    60*one_min                ; Time out = 10 minutes.
  433.             dc.w    scsi_endcmd
  434.                                             ;
  435.                                             ; Command $07 'REASSIGN BLOCKS'
  436.                                             ; Optional
  437.                                             ; 
  438. scsi_cmd07    dc.w    scsit_tx++\                ; It sends data to the target
  439.                     scsit_cont++\            ; It is a Control Command
  440.                     scsit_dvc++\            ; It is a Device I/O Command
  441.                     scsic_1st++\            ; Must be first device if linked
  442.                     scsic_int++\            ; Internal Driver Command Only
  443.                     scsid_asis++\            ; It is an as is Packet
  444.                     scsid_none                ; Length is not in command
  445.             dc.w    1*one_sec                ; Time out = one second.
  446.             dc.w    scsi_endcmd
  447.                                             ;
  448.                                             ; Command $08 'READ'
  449.                                             ; Mandatory
  450.                                             ; 
  451. scsi_cmd08    dc.w    scsit_rx++\                ; It requests data from target
  452.                     scsit_stat++\            ; It is a Status Command
  453.                     scsit_data++\            ; It is a Data I/O Command
  454.                     scsic_tout++\            ; Adjust time out by block count
  455.                     scsit_blk++\            ; It has a Block Number
  456.                     scsid_asis++\            ; It is an as is Packet
  457.                     scsid_blk                ; Length is in Blocks
  458.             dc.w    one_sec                    ; Time out = 1 second/Block.
  459.             dc.w    scsi_endcmd
  460.                                             ;
  461.                                             ; Command $0A 'WRITE'
  462.                                             ; Mandatory
  463.                                             ; 
  464. scsi_cmd0A    dc.w    scsit_tx++\                ; It sends data to the target
  465.                     scsit_cont++\            ; It is a Control Command
  466.                     scsit_data++\            ; It is a Data I/O Command
  467.                     scsic_tout++\            ; Adjust time out by block count
  468.                     scsit_blk++\            ; It has a Block Number
  469.                     scsid_asis++\            ; It is an as is Packet
  470.                     scsid_blk                ; Length is in Blocks
  471.             dc.w    one_sec                    ; Time out = 1 second/Block.
  472.             dc.w    scsi_endcmd
  473.                                             ;
  474.                                             ; Command $0B 'SEEK'
  475.                                             ; Optional
  476.                                             ; 
  477. scsi_cmd0B    dc.w    scsit_cont++\            ; It is a Control Command
  478.                     scsit_dvc++\            ; It is a Device I/O Command
  479.                     scsit_blk++\            ; It has a Block Number
  480.                     scsid_asis++\            ; It is an as is Packet
  481.                     scsid_none                ; Length is not in command
  482.             dc.w    1*one_sec                ; Time out = 1 second.
  483.             dc.w    scsi_endcmd
  484.                                             ;
  485.                                             ; Command $12 'INQUIRY'
  486.                                             ; Mandatory
  487.                                             ; 
  488. scsi_cmd12    dc.w    scsit_rx++\                ; It requests data from target
  489.                     scsit_stat++\            ; It is a Status Command
  490.                     scsit_dvc++\            ; It is a Device I/O Command
  491.                     scsid_asis++\            ; It is an as is Packet
  492.                     scsid_byte                ; Length is in Bytes
  493.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  494.             dc.w    scsi_endcmd
  495.                                             ;
  496.                                             ; Command $15 'MODE SELECT'
  497.                                             ; Optional
  498.                                             ; 
  499. scsi_cmd15    dc.w    scsit_tx++\                ; It sends data to the target
  500.                     scsit_cont++\            ; It is a Control Command
  501.                     scsit_dvc++\            ; It is a Device I/O Command
  502.                     scsic_1st++\            ; Must be first device if linked
  503.                     scsid_asis++\            ; It is an as is Packet
  504.                     scsid_byte                ; Length is in Bytes
  505.             dc.w    20*qtr_sec                ; Time out = 4 qtr second ticks.
  506.             dc.w    scsi_endcmd
  507.                                             ;
  508.                                             ; Command $16 'RESERVE UNIT'
  509.                                             ; Mandatory
  510.                                             ; 
  511. scsi_cmd16    dc.w    scsit_tx++\                ; It sends data to the target
  512.                     scsit_cont++\            ; It is a Control Command
  513.                     scsit_dvc++\            ; It is a Device I/O Command
  514.                     scsic_1st++\            ; Must be first device if linked
  515.                     scsid_asis++\            ; It is an as is Packet
  516.                     scsid_byte                ; Length is in Bytes
  517.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  518.             dc.w    scsi_endcmd
  519.                                             ;
  520.                                             ; Command $17 'RELEASE UNIT'
  521.                                             ; Mandatory
  522.                                             ; 
  523. scsi_cmd17    dc.w    scsit_cont++\            ; It is a Control Command
  524.                     scsit_dvc++\            ; It is a Device I/O Command
  525.                     scsic_1st++\            ; Must be first device if linked
  526.                     scsid_asis++\            ; It is an as is Packet
  527.                     scsid_none                ; Length is not in command
  528.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  529.             dc.w    scsi_endcmd
  530.                                             ;
  531.                                             ; Command $1A 'MODE SENSE'
  532.                                             ; Optional
  533.                                             ; 
  534. scsi_cmd1A    dc.w    scsit_rx++\                ; It requests data from target
  535.                     scsit_stat++\            ; It is a Status Command
  536.                     scsit_dvc++\            ; It is a Device I/O Command
  537.                     scsid_asis++\            ; It is an as is Packet
  538.                     scsid_byte                ; Length is in Bytes
  539.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  540.             dc.w    scsi_endcmd
  541.                                             ;
  542.                                             ; Command $1B 'START/STOP UNIT'
  543.                                             ; Optional
  544.                                             ; 
  545. scsi_cmd1B    dc.w    scsit_cont++\            ; It is a Control Command
  546.                     scsit_dvc++\            ; It is a Device I/O Command
  547.                     scsic_1st++\            ; Must be first device if linked
  548.                     scsic_dsw++\            ; Issue DISK_SW with this call
  549.                     scsic_off++\            ; Device is going offline.
  550.                     scsid_asis++\            ; It is an as is Packet
  551.                     scsid_none                ; Length is not in command
  552.             dc.w    20*qtr_sec                ; Time out = 20 qtr second ticks.
  553.             dc.w    scsi_endcmd
  554.                                             ;
  555.                                             ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
  556.                                             ; Optional
  557.                                             ; 
  558. scsi_cmd1C    dc.w    scsit_rx++\                ; It requests data from target
  559.                     scsit_stat++\            ; It is a Status Command
  560.                     scsit_dvc++\            ; It is a Device I/O Command
  561.                     scsid_asis++\            ; It is an as is Packet
  562.                     scsid_byte                ; Length is in Bytes
  563.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  564.             dc.w    scsi_endcmd
  565.                                             ;
  566.                                             ; Command $1D 'SEND DIAGNOSTICS'
  567.                                             ; Mandatory
  568.                                             ; 
  569. scsi_cmd1D    dc.w    scsit_tx++\                ; It sends data to the target
  570.                     scsit_cont++\            ; It is a Control Command
  571.                     scsit_dvc++\            ; It is a Device I/O Command
  572.                     scsid_asis++\            ; It is an as is Packet
  573.                     scsid_byte                ; Length is in Bytes
  574.             dc.w    10*one_min                ; Time out = 10 minutes.
  575.             dc.w    scsi_endcmd
  576.                                             ;
  577.                                             ; Command $1E 'PREVENT/ALLOW REMOVAL'
  578.                                             ; Optional
  579.                                             ; 
  580. scsi_cmd1E    dc.w    scsit_cont++\            ; It is a Control Command
  581.                     scsit_dvc++\            ; It is a Device I/O Command
  582.                     scsid_asis++\            ; It is an as is Packet
  583.                     scsid_none                ; Length is not in command
  584.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  585.             dc.w    scsi_endcmd
  586.                                             ;
  587.                                             ; Command $25 'READ CAPACITY'
  588.                                             ; Mandatory
  589.                                             ; 
  590. scsi_cmd25    dc.w    scsit_rx++\                ; It requests data from target
  591.                     scsit_stat++\            ; It is a Status Command
  592.                     scsit_dvc++\            ; It is a Device I/O Command
  593.                     scsid_asis++\            ; It is an as is Packet
  594.                     scsid_none                ; Length is not in command
  595.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  596.             dc.w    scsi_endcmd
  597.                                             ;
  598.                                             ; Command $28 'READ (EXTENDED)'
  599.                                             ; Mandatory
  600.                                             ; 
  601. scsi_cmd28    dc.w    scsit_rx++\                ; It requests data from target
  602.                     scsit_stat++\            ; It is a Status Command
  603.                     scsit_data++\            ; It is a Data I/O Command
  604.                     scsic_tout++\            ; Adjust time out by block count
  605.                     scsit_blk++\            ; It has a Block Number
  606.                     scsid_asis++\            ; It is an as is Packet
  607.                     scsid_blk                ; Length is in Blocks
  608.             dc.w    one_sec                    ; Time out = 1 second/Block.
  609.             dc.w    scsi_endcmd
  610.                                             ;
  611.                                             ; Command $2A 'WRITE (EXTENDED)'
  612.                                             ; Mandatory
  613.                                             ; 
  614. scsi_cmd2A    dc.w    scsit_tx++\                ; It sends data to the target
  615.                     scsit_cont++\            ; It is a Control Command
  616.                     scsit_data++\            ; It is a Data I/O Command
  617.                     scsic_tout++\            ; Adjust time out by block count
  618.                     scsit_blk++\            ; It has a Block Number
  619.                     scsid_asis++\            ; It is an as is Packet
  620.                     scsid_blk                ; Length is in Blocks
  621.             dc.w    one_sec                    ; Time out = 1 second/Block.
  622.             dc.w    scsi_endcmd
  623.                                             ;
  624.                                             ; Command $2B 'SEEK (EXTENDED)'
  625.                                             ; Optional
  626.                                             ; 
  627. scsi_cmd2B    dc.w    scsit_cont++\            ; It is a Control Command
  628.                     scsit_dvc++\            ; It is a Device I/O Command
  629.                     scsit_blk++\            ; It has a Block Number
  630.                     scsid_asis++\            ; It is an as is Packet
  631.                     scsid_none                ; Length is not in command
  632.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  633.             dc.w    scsi_endcmd
  634.                                             ;
  635.                                             ; Command $2E 'WRITE AND VERIFY'
  636.                                             ; Optional
  637.                                             ; 
  638. scsi_cmd2E    dc.w    scsit_tx++\                ; It sends data to the target
  639.                     scsit_cont++\            ; It is a Control Command
  640.                     scsit_data++\            ; It is a Data I/O Command
  641.                     scsic_tout++\            ; Adjust time out by block count
  642.                     scsit_blk++\            ; It has a Block Number
  643.                     scsid_asis++\            ; It is an as is Packet
  644.                     scsid_blk                ; Length is in Blocks
  645.             dc.w    one_sec                    ; Time out = 1 second/Block.
  646.             dc.w    scsi_endcmd
  647.                                             ;
  648.                                             ; Command $2F 'VERIFY'
  649.                                             ; Optional
  650.                                             ; 
  651. scsi_cmd2F    dc.w    scsit_cont++\            ; It is a Control Command
  652.                     scsit_dvc++\            ; It is a Device I/O Command
  653.                     scsic_tout++\            ; Adjust time out by block count
  654.                     scsit_blk++\            ; It has a Block Number
  655.                     scsid_asis++\            ; It is an as is Packet
  656.                     scsid_none                ; Length is not in command
  657.             dc.w    one_sec                    ; Time out = 1 second/Block.
  658.             dc.w    scsi_endcmd
  659.                                             ;
  660.                                             ; Command $33 'SET LIMITS'
  661.                                             ; Optional
  662.                                             ; 
  663. scsi_cmd33    dc.w    scsit_cont++\            ; It is a Control Command
  664.                     scsic_int++\            ; Internal Driver Command Only
  665.                     scsit_dvc++\            ; It is a Device I/O Command
  666.                     scsit_blk++\            ; It has a Block Number
  667.                     scsid_asis++\            ; It is an as is Packet
  668.                     scsid_none                ; Length is not in command
  669.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  670.             dc.w    scsi_endcmd
  671.                                             ;
  672.                                             ; Command $34 'PRE-FETCH'
  673.                                             ; Optional
  674.                                             ; 
  675. scsi_cmd34    dc.w    scsit_cont++\            ; It is a Control Command
  676.                     scsit_dvc++\            ; It is a Device I/O Command
  677.                     scsit_blk++\            ; It has a Block Number
  678.                     scsid_asis++\            ; It is an as is Packet
  679.                     scsid_none                ; Length is not in command
  680.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  681.             dc.w    scsi_endcmd
  682.                                             ;
  683.                                             ; Command $35 'SYNCHRONIZE CACHE'
  684.                                             ; Optional
  685.                                             ; 
  686. scsi_cmd35    dc.w    scsit_cont++\            ; It is a Control Command
  687.                     scsit_dvc++\            ; It is a Device I/O Command
  688.                     scsit_blk++\            ; It has a Block Number
  689.                     scsid_asis++\            ; It is an as is Packet
  690.                     scsid_none                ; Length is not in command
  691.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  692.             dc.w    scsi_endcmd
  693.                                             ;
  694.                                             ; Command $36 'LOCK/UNLOCK CACHE'
  695.                                             ; Optional
  696.                                             ; 
  697. scsi_cmd36    dc.w    scsit_cont++\            ; It is a Control Command
  698.                     scsit_dvc++\            ; It is a Device I/O Command
  699.                     scsit_blk++\            ; It has a Block Number
  700.                     scsid_asis++\            ; It is an as is Packet
  701.                     scsid_none                ; Length is not in command
  702.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  703.             dc.w    scsi_endcmd
  704.                                             ;
  705.                                             ; Command $37 'READ DEFECT DATA'
  706.                                             ; Optional
  707.                                             ; 
  708. scsi_cmd37    dc.w    scsit_rx++\                ; It requests data from target
  709.                     scsit_stat++\            ; It is a Status Command
  710.                     scsit_dvc++\            ; It is a Device I/O Command
  711.                     scsid_asis++\            ; It is an as is Packet
  712.                     scsid_byte                ; Length is in Bytes
  713.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  714.             dc.w    scsi_endcmd
  715.                                             ;
  716.                                             ; Command $3B 'WRITE BUFFER'
  717.                                             ; Optional
  718.                                             ; 
  719. scsi_cmd3B    dc.w    scsit_tx++\                ; It sends data to the target
  720.                     scsit_cont++\            ; It is a Control Command
  721.                     scsit_data++\            ; It is a Data I/O Command
  722.                     scsid_asis++\            ; It is an as is Packet
  723.                     scsid_byte                ; Length is in Bytes
  724.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  725.             dc.w    scsi_endcmd
  726.                                             ;
  727.                                             ; Command $3C 'READ BUFFER'
  728.                                             ; Optional
  729.                                             ; 
  730. scsi_cmd3C    dc.w    scsit_rx++\                ; It requests data from target
  731.                     scsit_stat++\            ; It is a Status Command
  732.                     scsit_data++\            ; It is a Data I/O Command
  733.                     scsid_asis++\            ; It is an as is Packet
  734.                     scsid_byte                ; Length is in Bytes
  735.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  736.             dc.w    scsi_endcmd
  737.                                             ;
  738.                                             ; Command $3E 'READ LONG'
  739.                                             ; Optional
  740.                                             ; 
  741. scsi_cmd3E    dc.w    scsit_rx++\                ; It requests data from target
  742.                     scsit_stat++\            ; It is a Status Command
  743.                     scsit_data++\            ; It is a Data I/O Command
  744.                     scsit_blk++\            ; It has a Block Number
  745.                     scsid_asis++\            ; It is an as is Packet
  746.                     scsid_byte                ; Length is in Bytes
  747.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  748.             dc.w    scsi_endcmd
  749.                                             ;
  750.                                             ; Command $3F 'WRITE LONG'
  751.                                             ; Optional
  752.                                             ; 
  753. scsi_cmd3F    dc.w    scsit_tx++\                ; It sends data to the target
  754.                     scsit_cont++\            ; It is a Control Command
  755.                     scsit_data++\            ; It is a Data I/O Command
  756.                     scsit_blk++\            ; It has a Block Number
  757.                     scsid_asis++\            ; It is an as is Packet
  758.                     scsid_byte                ; Length is in Bytes
  759.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  760.             dc.w    scsi_endcmd
  761.                                             ;
  762.                                             ; Command $4C 'LOG SELECT'
  763.                                             ; Optional
  764.                                             ; 
  765. scsi_cmd4C    dc.w    scsit_tx++\                ; SCSI Send Data Command
  766.                     scsit_cont++\            ; SCSI Control Command
  767.                     scsit_data++\            ; SCSI Data I/O Command
  768.                     scsid_asis++\            ; CMD Data is in SCSI format
  769.                     scsid_byte                ; Leave Trans Count in Bytes
  770.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  771.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  772.                                             ;
  773.                                             ; Command $4D 'LOG SENSE'
  774.                                             ; Optional
  775.                                             ; 
  776. scsi_cmd4D    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  777.                     scsit_stat++\            ; SCSI Status Command
  778.                     scsit_data++\            ; SCSI Data I/O Command
  779.                     scsid_asis++\            ; CMD Data is in SCSI format
  780.                     scsid_byte                ; Leave Trans Count in Bytes
  781.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  782.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  783.                                             ;
  784.                                             ; Command $55 'MODE SELECT'
  785.                                             ; Optional
  786.                                             ; 
  787. scsi_cmd55    dc.w    scsit_tx++\                ; It sends data to the target
  788.                     scsit_cont++\            ; It is a Control Command
  789.                     scsit_dvc++\            ; It is a Device I/O Command
  790.                     scsic_1st++\            ; Must be first device if linked
  791.                     scsid_asis++\            ; It is an as is Packet
  792.                     scsid_byte                ; Length is in Bytes
  793.             dc.w    one_sec                    ; Time out = 4 qtr second tick.
  794.             dc.w    scsi_endcmd
  795.                                             ;
  796.                                             ; Command $5A 'MODE SENSE'
  797.                                             ; Mandatory
  798.                                             ; 
  799. scsi_cmd5A    dc.w    scsit_rx++\                ; It requests data from target
  800.                     scsit_stat++\            ; It is a Status Command
  801.                     scsit_dvc++\            ; It is a Device I/O Command
  802.                     scsid_asis++\            ; It is an as is Packet
  803.                     scsid_byte                ; Length is in Bytes
  804.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  805.             dc.w    scsi_endcmd
  806.                                             ;
  807.                                             ; Command $B3 'SET LIMITS'
  808.                                             ; Optional
  809.                                             ; 
  810. scsi_cmdB3    dc.w    scsit_cont++\            ; It is a Control Command
  811.                     scsit_dvc++\            ; It is a Device I/O Command
  812.                     scsit_blk++\            ; It has a Block Number
  813.                     scsid_asis++\            ; It is an as is Packet
  814.                     scsid_none                ; Length is not in command
  815.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  816.             dc.w    scsi_endcmd
  817.  
  818.             ENDIF
  819.  
  820. ;-------------------------------------------------------------------------------
  821.  
  822.             IF        scsi_dtype = apple_cd    THEN
  823.  
  824.                                             ;
  825.                                             ; Command $00 'TEST UNIT READY'
  826.                                             ; Mandatory
  827.                                             ; 
  828. scsi_cmd00    dc.w    scsit_stat++\            ; It is a Status Command
  829.                     scsit_dvc++\            ; It is a Device I/O Command
  830.                     scsid_asis++\            ; It is an as is Packet
  831.                     scsid_none                ; Length is not in command
  832.             dc.w    5*one_min                ; Time out = 10 minutes.
  833.             dc.w    scsi_endcmd
  834.                                             ;
  835.                                             ; Command $01 'REZERO UNIT'
  836.                                             ; Optional
  837.                                             ; 
  838. scsi_cmd01    dc.w    scsit_cont++\            ; It is a Control Command
  839.                     scsit_dvc++\            ; It is a Device I/O Command
  840.                     scsid_asis++\            ; It is an as is Packet
  841.                     scsid_none                ; Length is not in command
  842.             dc.w    1*one_min                ; Time out = 10 minutes.
  843.             dc.w    scsi_endcmd
  844.                                             ;
  845.                                             ; Command $03 'REQUEST SENSE'
  846.                                             ; Mandatory
  847.                                             ; 
  848. scsi_cmd03    dc.w    scsit_rx++\                ; It requests data from target
  849.                     scsit_stat++\            ; It is a Status Command
  850.                     scsit_dvc++\            ; It is a Device I/O Command
  851.                     scsid_asis++\            ; It is an as is Packet
  852.                     scsid_byte                ; Length is in Bytes
  853.             dc.w    1*one_min                ; Time out = 10 minutes.
  854.             dc.w    scsi_endcmd
  855.                                             ;
  856.                                             ; Command $08 'READ'
  857.                                             ; Mandatory
  858.                                             ; 
  859. scsi_cmd08    dc.w    scsit_rx++\                ; It requests data from target
  860.                     scsit_stat++\            ; It is a Status Command
  861.                     scsit_data++\            ; It is a Data I/O Command
  862.                     scsic_tout++\            ; Adjust time out by block count
  863.                     scsit_blk++\            ; It has a Block Number
  864.                     scsid_asis++\            ; It is an as is Packet
  865.                     scsid_blk                ; Length is in Blocks
  866.             dc.w    4*qtr_sec                ; Time out = 1 second/block.
  867.             dc.w    scsi_endcmd
  868.                                             ;
  869.                                             ; Command $0B 'SEEK'
  870.                                             ; Optional
  871.                                             ; 
  872. scsi_cmd0B    dc.w    scsit_cont++\            ; It is a Control Command
  873.                     scsit_dvc++\            ; It is a Device I/O Command
  874.                     scsit_blk++\            ; It has a Block Number
  875.                     scsid_asis++\            ; It is an as is Packet
  876.                     scsid_none                ; Length is not in command
  877.             dc.w    1*one_min                ; Time out = 10 minutes.
  878.             dc.w    scsi_endcmd
  879.                                             ;
  880.                                             ; Command $12 'INQUIRY'
  881.                                             ; Mandatory
  882.                                             ; 
  883. scsi_cmd12    dc.w    scsit_rx++\                ; It requests data from target
  884.                     scsit_stat++\            ; It is a Status Command
  885.                     scsit_dvc++\            ; It is a Device I/O Command
  886.                     scsid_asis++\            ; It is an as is Packet
  887.                     scsid_byte                ; Length is in Bytes
  888.             dc.w    1*one_min                ; Time out = 10 minutes.
  889.             dc.w    scsi_endcmd
  890.                                             ;
  891.                                             ; Command $15 'MODE SELECT'
  892.                                             ; Optional
  893.                                             ; 
  894. scsi_cmd15    dc.w    scsit_tx++\                ; It sends data to the target
  895.                     scsit_cont++\            ; It is a Control Command
  896.                     scsit_dvc++\            ; It is a Device I/O Command
  897.                     scsic_1st++\            ; Must be first device if linked
  898.                     scsid_asis++\            ; It is an as is Packet
  899.                     scsid_byte                ; Length is in Bytes
  900.             dc.w    1*one_min                ; Time out = 10 minutes.
  901.             dc.w    scsi_endcmd
  902.                                             ;
  903.                                             ; Command $16 'RESERVE UNIT'
  904.                                             ; Mandatory
  905.                                             ; 
  906. scsi_cmd16    dc.w    scsit_tx++\                ; It sends data to the target
  907.                     scsit_cont++\            ; It is a Control Command
  908.                     scsit_dvc++\            ; It is a Device I/O Command
  909.                     scsic_1st++\            ; Must be first device if linked
  910.                     scsid_asis++\            ; It is an as is Packet
  911.                     scsid_byte                ; Length is in Bytes
  912.             dc.w    1*one_min                ; Time out = 10 minutes.
  913.             dc.w    scsi_endcmd
  914.                                             ;
  915.                                             ; Command $17 'RELEASE UNIT'
  916.                                             ; Mandatory
  917.                                             ; 
  918. scsi_cmd17    dc.w    scsit_cont++\            ; It is a Control Command
  919.                     scsit_dvc++\            ; It is a Device I/O Command
  920.                     scsic_1st++\            ; Must be first device if linked
  921.                     scsid_asis++\            ; It is an as is Packet
  922.                     scsid_none                ; Length is not in command
  923.             dc.w    1*one_min                ; Time out = 10 minutes.
  924.             dc.w    scsi_endcmd
  925.                                             ;
  926.                                             ; Command $1A 'MODE SENSE'
  927.                                             ; Optional
  928.                                             ; 
  929. scsi_cmd1A    dc.w    scsit_rx++\                ; It requests data from target
  930.                     scsit_stat++\            ; It is a Status Command
  931.                     scsit_dvc++\            ; It is a Device I/O Command
  932.                     scsid_asis++\            ; It is an as is Packet
  933.                     scsid_byte                ; Length is in Bytes
  934.             dc.w    1*one_min                ; Time out = 10 minutes.
  935.             dc.w    scsi_endcmd
  936.                                             ;
  937.                                             ; Command $1B 'START/STOP UNIT'
  938.                                             ; Optional
  939.                                             ; 
  940. scsi_cmd1B    dc.w    scsit_cont++\            ; It is a Control Command
  941.                     scsit_dvc++\            ; It is a Device I/O Command
  942.                     scsic_1st++\            ; Must be first device if linked
  943.                     scsic_dsw++\            ; Issue DISK_SW with this call
  944.                     scsic_off++\            ; Device is going offline.
  945.                     scsid_asis++\            ; It is an as is Packet
  946.                     scsid_none                ; Length is not in command
  947.             dc.w    1*one_min                ; Time out = 10 minutes.
  948.             dc.w    scsi_endcmd
  949.                                             ;
  950.                                             ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS'
  951.                                             ; Optional
  952.                                             ; 
  953. scsi_cmd1C    dc.w    scsit_rx++\                ; It requests data from target
  954.                     scsit_stat++\            ; It is a Status Command
  955.                     scsit_dvc++\            ; It is a Device I/O Command
  956.                     scsid_asis++\            ; It is an as is Packet
  957.                     scsid_byte                ; Length is in Bytes
  958.             dc.w    1*one_min                ; Time out = 10 minutes.
  959.             dc.w    scsi_endcmd
  960.                                             ;
  961.                                             ; Command $1D 'SEND DIAGNOSTICS'
  962.                                             ; Mandatory
  963.                                             ; 
  964. scsi_cmd1D    dc.w    scsit_tx++\                ; It sends data to the target
  965.                     scsit_cont++\            ; It is a Control Command
  966.                     scsit_dvc++\            ; It is a Device I/O Command
  967.                     scsid_asis++\            ; It is an as is Packet
  968.                     scsid_byte                ; Length is in Bytes
  969.             dc.w    1*one_min                ; Time out = 10 minutes.
  970.             dc.w    scsi_endcmd
  971.                                             ;
  972.                                             ; Command $1E 'PREVENT/ALLOW REMOVAL'
  973.                                             ; Optional
  974.                                             ; 
  975. scsi_cmd1E    dc.w    scsit_cont++\            ; It is a Control Command
  976.                     scsit_dvc++\            ; It is a Device I/O Command
  977.                     scsid_asis++\            ; It is an as is Packet
  978.                     scsid_none                ; Length is not in command
  979.             dc.w    1*one_min                ; Time out = 10 minutes.
  980.             dc.w    scsi_endcmd
  981.                                             ;
  982.                                             ; Command $25 'READ CAPACITY'
  983.                                             ; Mandatory
  984.                                             ; 
  985. scsi_cmd25    dc.w    scsit_rx++\                ; It requests data from target
  986.                     scsit_stat++\            ; It is a Status Command
  987.                     scsit_dvc++\            ; It is a Device I/O Command
  988.                     scsid_asis++\            ; It is an as is Packet
  989.                     scsid_none                ; Length is not in command
  990.             dc.w    1*one_min                ; Time out = 10 minutes.
  991.             dc.w    scsi_endcmd
  992.                                             ;
  993.                                             ; Command $28 'READ (EXTENDED)'
  994.                                             ; Mandatory
  995.                                             ; 
  996. scsi_cmd28    dc.w    scsit_rx++\                ; It requests data from target
  997.                     scsit_stat++\            ; It is a Status Command
  998.                     scsit_data++\            ; It is a Data I/O Command
  999.                     scsic_tout++\            ; Adjust time out by block count
  1000.                     scsit_blk++\            ; It has a Block Number
  1001.                     scsid_asis++\            ; It is an as is Packet
  1002.                     scsid_blk                ; Length is in Blocks
  1003.             dc.w    4*qtr_sec                ; Time out = 1 second/block.
  1004.             dc.w    scsi_endcmd
  1005.                                             ;
  1006.                                             ; Command $2B 'SEEK (EXTENDED)'
  1007.                                             ; Optional
  1008.                                             ; 
  1009. scsi_cmd2B    dc.w    scsit_cont++\            ; It is a Control Command
  1010.                     scsit_dvc++\            ; It is a Device I/O Command
  1011.                     scsit_blk++\            ; It has a Block Number
  1012.                     scsid_asis++\            ; It is an as is Packet
  1013.                     scsid_none                ; Length is not in command
  1014.             dc.w    1*one_min                ; Time out = 10 minutes.
  1015.             dc.w    scsi_endcmd
  1016.                                             ;
  1017.                                             ; Command $2F 'VERIFY'
  1018.                                             ; Optional
  1019.                                             ; 
  1020. scsi_cmd2F    dc.w    scsit_cont++\            ; It is a Control Command
  1021.                     scsit_dvc++\            ; It is a Device I/O Command
  1022.                     scsic_tout++\            ; Adjust time out by block count
  1023.                     scsit_blk++\            ; It has a Block Number
  1024.                     scsid_asis++\            ; It is an as is Packet
  1025.                     scsid_none                ; Length is not in command
  1026.             dc.w    4*qtr_sec                ; Time out = 1 second/block.
  1027.             dc.w    scsi_endcmd
  1028.                                             ;
  1029.                                             ; Command $3B 'WRITE BUFFER'
  1030.                                             ; Optional
  1031.                                             ; 
  1032. scsi_cmd3B    dc.w    scsit_tx++\                ; It sends data to the target
  1033.                     scsit_cont++\            ; It is a Control Command
  1034.                     scsit_data++\            ; It is a Data I/O Command
  1035.                     scsid_asis++\            ; It is an as is Packet
  1036.                     scsid_byte                ; Length is in Bytes
  1037.             dc.w    10*one_min                ; Time out = 10 minutes.
  1038.             dc.w    scsi_endcmd
  1039.                                             ;
  1040.                                             ; Command $3C 'READ BUFFER'
  1041.                                             ; Optional
  1042.                                             ; 
  1043. scsi_cmd3C    dc.w    scsit_rx++\                ; It requests data from target
  1044.                     scsit_stat++\            ; It is a Status Command
  1045.                     scsit_data++\            ; It is a Data I/O Command
  1046.                     scsid_asis++\            ; It is an as is Packet
  1047.                     scsid_byte                ; Length is in Bytes
  1048.             dc.w    10*one_min                ; Time out = 10 minutes.
  1049.             dc.w    scsi_endcmd
  1050.                                             ;
  1051.                                             ; Command $4C 'LOG SELECT'
  1052.                                             ; Optional
  1053.                                             ; 
  1054. scsi_cmd4C    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1055.                     scsit_cont++\            ; SCSI Control Command
  1056.                     scsit_data++\            ; SCSI Data I/O Command
  1057.                     scsid_asis++\            ; CMD Data is in SCSI format
  1058.                     scsid_byte                ; Leave Trans Count in Bytes
  1059.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  1060.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1061.                                             ;
  1062.                                             ; Command $4D 'LOG SENSE'
  1063.                                             ; Optional
  1064.                                             ; 
  1065. scsi_cmd4D    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1066.                     scsit_stat++\            ; SCSI Status Command
  1067.                     scsit_data++\            ; SCSI Data I/O Command
  1068.                     scsid_asis++\            ; CMD Data is in SCSI format
  1069.                     scsid_byte                ; Leave Trans Count in Bytes
  1070.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  1071.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1072.                                             ;
  1073.                                             ; Command $55 'MODE SELECT (EXTENDED)'
  1074.                                             ; Optional
  1075.                                             ; 
  1076. scsi_cmd55    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1077.                     scsit_cont++\            ; SCSI Control Command
  1078.                     scsit_dvc++\            ; SCSI Device I/O Command
  1079.                     scsid_asis++\            ; CMD Data is in SCSI format
  1080.                     scsid_byte                ; Leave Trans Count in Bytes
  1081.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  1082.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1083.                                             ;
  1084.                                             ; Command $5A 'MODE SENSE (EXTENDED)'
  1085.                                             ; Optional
  1086.                                             ; 
  1087. scsi_cmd5A    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1088.                     scsit_stat++\            ; SCSI Status Command
  1089.                     scsit_dvc++\            ; SCSI Device I/O Command
  1090.                     scsid_asis++\            ; CMD Data is in SCSI format
  1091.                     scsid_byte                ; Leave Trans Count in Bytes
  1092.             dc.w    4*qtr_sec                ; Time out = 4 qtr second ticks.
  1093.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1094.                                             ;
  1095.                                             ; Command $C0 'EJECT DISK'
  1096.                                             ; Mandatory
  1097.                                             ; 
  1098. scsi_cmdC0    dc.w    scsit_cont++\            ; It is a Control Command
  1099.                     scsit_dvc++\            ; It is a Device I/O Command
  1100.                     scsic_dsw++\            ; Issue DISK_SW with this call
  1101.                     scsic_off++\            ; Device is going offline.
  1102.                     scsid_asis++\            ; CMD Data is in SCSI format
  1103.                     scsid_none                ; Length is not in command
  1104.             dc.w    10*one_min                ; Time out = 10 minutes.
  1105.             dc.w    scsi_endcmd
  1106.                                             ;
  1107.                                             ; Command $C1 'READ TOC'
  1108.                                             ; Mandatory
  1109.                                             ; 
  1110. scsi_cmdC1    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1111.                     scsit_stat++\            ; SCSI Status Command
  1112.                     scsit_data++\            ; SCSI Data I/O Command
  1113.                     scsid_byte                ; Leave Trans Count in Bytes
  1114.             dc.w    10*one_min                ; Time out = 10 minutes.
  1115.             dc.w    $0101
  1116.             dc.w    $0205
  1117.             dc.w    $0307
  1118.             dc.w    $0408
  1119.             dc.w    $0509
  1120.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1121.                                             ;
  1122.                                             ; Command $C2 'READ Q SUBCODE'
  1123.                                             ; Mandatory
  1124.                                             ; 
  1125. scsi_cmdC2    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1126.                     scsit_stat++\            ; SCSI Status Command
  1127.                     scsit_dvc++\            ; SCSI Device I/O Command
  1128.                     scsid_byte                ; Leave Trans Count in Bytes
  1129.             dc.w    10*one_min                ; Time out = 10 minutes.
  1130.             dc.w    $0101
  1131.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1132.                                             ;
  1133.                                             ; Command $C3 'READ HEADER'
  1134.                                             ; Mandatory
  1135.                                             ; 
  1136. scsi_cmdC3    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1137.                     scsit_stat++\            ; SCSI Status Command
  1138.                     scsit_data++\            ; SCSI Data I/O Command
  1139.                     scsid_byte                ; Leave Trans Count in Bytes
  1140.             dc.w    10*one_min                ; Time out = 10 minutes.
  1141.             dc.w    $0101
  1142.             dc.w    $0202
  1143.             dc.w    $0303
  1144.             dc.w    $0404
  1145.             dc.w    $0505
  1146.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1147.                                             ;
  1148.                                             ; Command $C8 'AUDIO TRACK SEARCH'
  1149.                                             ; Mandatory
  1150.                                             ; 
  1151. scsi_cmdC8    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1152.                     scsit_cont++\            ; SCSI Control Command
  1153.                     scsit_dvc++\            ; SCSI Device I/O Command
  1154.                     scsid_none                ; Transfer count does not go in CMD
  1155.             dc.w    10*one_min                ; Time out = 10 minutes.
  1156.             dc.w    $0101
  1157.             dc.w    $0201
  1158.             dc.w    $0301
  1159.             dc.w    $0402
  1160.             dc.w    $0503
  1161.             dc.w    $0604
  1162.             dc.w    $0705
  1163.             dc.w    $0809
  1164.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1165.                                             ;
  1166.                                             ; Command $C9 'AUDIO PLAY'
  1167.                                             ; Mandatory
  1168.                                             ; 
  1169. scsi_cmdC9    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1170.                     scsit_cont++\            ; SCSI Control Command
  1171.                     scsit_dvc++\            ; SCSI Device I/O Command
  1172.                     scsid_none                ; Transfer count does not go in CMD
  1173.             dc.w    10*one_min                ; Time out = 10 minutes.
  1174.             dc.w    $0101
  1175.             dc.w    $0201
  1176.             dc.w    $0301
  1177.             dc.w    $0402
  1178.             dc.w    $0503
  1179.             dc.w    $0604
  1180.             dc.w    $0705
  1181.             dc.w    $0809
  1182.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1183.                                             ;
  1184.                                             ; Command $CA 'AUDIO PAUSE'
  1185.                                             ; Mandatory
  1186.                                             ; 
  1187. scsi_cmdCA    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1188.                     scsit_cont++\            ; SCSI Control Command
  1189.                     scsit_dvc++\            ; SCSI Device I/O Command
  1190.                     scsid_none                ; Transfer count does not go in CMD
  1191.             dc.w    10*one_min                ; Time out = 10 minutes.
  1192.             dc.w    $0101
  1193.             dc.w    $0201
  1194.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1195.                                             ;
  1196.                                             ; Command $CB 'AUDIO STOP'
  1197.                                             ; Mandatory
  1198.                                             ; 
  1199. scsi_cmdCB    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1200.                     scsit_cont++\            ; SCSI Control Command
  1201.                     scsit_dvc++\            ; SCSI Device I/O Command
  1202.                     scsid_none                ; Transfer count does not go in CMD
  1203.             dc.w    10*one_min                ; Time out = 10 minutes.
  1204.             dc.w    $0101
  1205.             dc.w    $0202
  1206.             dc.w    $0303
  1207.             dc.w    $0404
  1208.             dc.w    $0505
  1209.             dc.w    $0609
  1210.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1211.                                             ;
  1212.                                             ; Command $CC 'AUDIO STATUS'
  1213.                                             ; Mandatory
  1214.                                             ; 
  1215. scsi_cmdCC    dc.w    scsit_rx++\                ; SCSI Receive Data Command
  1216.                     scsit_stat++\            ; SCSI Status Command
  1217.                     scsit_dvc++\            ; SCSI Device I/O Command
  1218.                     scsid_byte                ; Leave Trans Count in Bytes
  1219.             dc.w    10*one_min                ; Time out = 10 minutes.
  1220.             dc.w    $0101
  1221.             dc.w    $0201
  1222.             dc.w    $0301
  1223.             dc.w    $0402
  1224.             dc.w    $0503
  1225.             dc.w    $0604
  1226.             dc.w    $0705
  1227.             dc.w    $0809
  1228.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1229.                                             ;
  1230.                                             ; Command $CD 'AUDIO SCAN'
  1231.                                             ; Mandatory
  1232.                                             ; 
  1233. scsi_cmdCD    dc.w    scsit_tx++\                ; SCSI Send Data Command
  1234.                     scsit_cont++\            ; SCSI Control Command
  1235.                     scsit_dvc++\            ; SCSI Device I/O Command
  1236.                     scsid_none                ; Transfer count does not go in CMD
  1237.             dc.w    10*one_min                ; Time out = 10 minutes.
  1238.             dc.w    $0101
  1239.             dc.w    scsi_endcmd                ; End of SCSI Translation Table
  1240.  
  1241.             ENDIF
  1242.  
  1243. ;-------------------------------------------------------------------------------
  1244.  
  1245.  
  1246.             ENDP
  1247.             
  1248.             EJECT
  1249.  
  1250.  
  1251. ;*******************************************************
  1252. ;
  1253. ;    Command Packet Size Table:
  1254. ;
  1255. ;    This table is indexed by (Group Number * 6)
  1256. ;
  1257. ;    The first word in an entry equals the Packet Size.
  1258. ;    This is used to set the command length in the data
  1259. ;    for the SCSI Manager calls.  If this value is null,
  1260. ;    then the group is undefined for this driver.
  1261. ;
  1262. ;    The next byte is the offset to the first and most
  1263. ;    significant byte of the requested block number if
  1264. ;    used in this packet.
  1265. ;
  1266. ;    The byte following this is the number of bytes that
  1267. ;    make up a valid Block Number.
  1268. ;
  1269. ;    The next byte is the offset to the first and most
  1270. ;    significant byte of the requested data length if
  1271. ;    used in this packet.
  1272. ;
  1273. ;    The byte following this is the number of bytes that
  1274. ;    make up a valid request length.
  1275. ;
  1276. ;*******************************************************
  1277.  
  1278.             EXPORT    cmd_ps_tbl
  1279. cmd_ps_tbl    PROC
  1280. start_tbl
  1281.                                             ;
  1282.                                             ; Group 0 Commands
  1283.                                             ;
  1284.             dc.w    0006                    ; 6 Byte Command.
  1285.             dc.b    $03                        ; Offset to last Block Parm
  1286.             EXPORT    c_blk_len:EQU
  1287. c_blk_len    equ        *-start_tbl                ; Equated offset to Block Length
  1288.             dc.b    $02                        ; Length of Block Parm
  1289.             dc.b    $04                        ; Offset to last Length Parm
  1290.             EXPORT    c_len_len:EQU
  1291. c_len_len    equ        *-start_tbl                ; Equated offset to Length Length
  1292.             dc.b    $01                        ; Length of Length Parm
  1293.                                             ;
  1294.                                             ; Group 1 Commands
  1295.                                             ;
  1296.             dc.w    0010                    ; 10 Byte Command.
  1297.             dc.b    $05                        ; Offset to last Block Parm
  1298.             dc.b    $04                        ; Length of Block Parm
  1299.             dc.b    $08                        ; Offset to last Length Parm
  1300.             dc.b    $03                        ; Length of Length Parm
  1301.                                             ;
  1302.                                             ; Group 2 Commands
  1303.                                             ;
  1304.             dc.w    0010                    ; 10 Byte Command.
  1305.             dc.b    $05                        ; Offset to last Block Parm
  1306.             dc.b    $04                        ; Length of Block Parm
  1307.             dc.b    $08                        ; Offset to last Length Parm
  1308.             dc.b    $03                        ; Length of Length Parm
  1309.                                             ;
  1310.                                             ; Group 3 Commands
  1311.                                             ;
  1312.             dc.w    0000                    ; Reserved Command.
  1313.             dc.b    $00                        ; Offset to last Block Parm
  1314.             dc.b    $00                        ; Length of Block Parm
  1315.             dc.b    $00                        ; Offset to last Length Parm
  1316.             dc.b    $00                        ; Length of Length Parm
  1317.                                             ;
  1318.                                             ; Group 4 Commands
  1319.                                             ;
  1320.             dc.w    0000                    ; Reserved Command.
  1321.             dc.b    $00                        ; Offset to last Block Parm
  1322.             dc.b    $00                        ; Length of Block Parm
  1323.             dc.b    $00                        ; Offset to last Length Parm
  1324.             dc.b    $00                        ; Length of Length Parm
  1325.                                             ;
  1326.                                             ; Group 5 Commands
  1327.                                             ;
  1328.             dc.w    0012                    ; 12 Byte Command.
  1329.             dc.b    $05                        ; Offset to last Block Parm
  1330.             dc.b    $04                        ; Length of Block Parm
  1331.             dc.b    $09                        ; Offset to last Length Parm
  1332.             dc.b    $04                        ; Length of Length Parm
  1333.                                             ;
  1334.                                             ; Group 6 Commands
  1335.                                             ;
  1336.             dc.w    0010                    ; 10 Byte Command.
  1337.             dc.b    $05                        ; Offset to last Block Parm
  1338.             dc.b    $04                        ; Length of Block Parm
  1339.             dc.b    $08                        ; Offset to last Length Parm
  1340.             dc.b    $03                        ; Length of Length Parm
  1341.                                             ;
  1342.                                             ; Group 7 Commands
  1343.                                             ;
  1344.             dc.w    0000                    ; Reserved Command.
  1345.             dc.b    $00                        ; Offset to last Block Parm
  1346.             dc.b    $00                        ; Length of Block Parm
  1347.             dc.b    $00                        ; Offset to last Length Parm
  1348.             dc.b    $00                        ; Length of Length Parm
  1349.  
  1350.             ENDP
  1351.             
  1352.             EJECT
  1353.  
  1354. ;*******************************************************
  1355. ;
  1356. ;    Internal Data Buffer:
  1357. ;
  1358. ;    This buffer is used by the driver for all of it's
  1359. ;    maintainence I/O between it and the devices that it
  1360. ;    manages or communicates with.  This is where any
  1361. ;    INQUIRY data will be received or blocks read in that
  1362. ;    are needed by the driver to make any kind of
  1363. ;    determination.  There is also a section reserved for
  1364. ;    the REQUEST SENSE command for that last command sent.
  1365. ;
  1366. ;*******************************************************
  1367.  
  1368.                 EXPORT    internal_buff
  1369. internal_buff    PROC
  1370.  
  1371.  
  1372. ;-------------------------------------------------------------------------------
  1373.  
  1374.                 IF            scsi_dtype = direct_acc    THEN
  1375.  
  1376.                 dcb.b    block_size+20,0        ;Incase 532 byte block
  1377.  
  1378.                 ENDIF
  1379.  
  1380. ;-------------------------------------------------------------------------------
  1381.  
  1382.                 IF            scsi_dtype = apple_cd    THEN
  1383.  
  1384.                 dcb.b    block_size*4,0        ;Worst case 2k Block size
  1385.  
  1386.                 ENDIF
  1387.  
  1388. ;-------------------------------------------------------------------------------
  1389.  
  1390.                 ENDP
  1391.  
  1392.                 END
  1393.  
  1394.                 EJECT